#ifndef LINKLIST
#define LINKLIST
#include "stdafx.h"
#include "io.h"
#include "math.h"
#include "time.h"


#define OK 1
#define ERROR 0
#define TRUE 1
#define FALSE 0 

#define MAXSIZE 20
typedef int Status;

typedef int ElemDataType;


typedef struct  
{
	ElemDataType data;
	
	struct Node *next;


}Node,LinkList;

Status InitList(LinkList *L);

void  CreateListHead(LinkList *L);
void  CreateListTail(LinkList *L);

int ListLength(LinkList *L);

Status ListEmpty(LinkList *L);

Status ListInsert(LinkList *L,int i, ElemDataType e);

Status ListDelete(LinkList *L,int i,ElemDataType *e);

Status ClearList(LinkList *L);

Status GetElem(LinkList *L,ElemDataType *e);

Status TraverseList(LinkList *L);

int LocateElem(LinkList *L, ElemDataType e);




#endif // !LINKLIST
